package com.shensi.appCollect.service.impl;


import com.shensi.appCollect.dao.ReductionRulesMapper;
import com.shensi.appCollect.pojo.ReductionRules;
import com.shensi.appCollect.service.ReductionRulesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 立减活动规则Service业务层处理
 * 
 * @author qujia
 * @date 2021-11-03
 */
@Service("reductionRulesService")
public class ReductionRulesServiceImpl implements ReductionRulesService
{
    @Resource
    private ReductionRulesMapper reductionRulesMapper;

    /**
     * 查询立减活动规则
     * 
     * @param rulesId 立减活动规则ID
     * @return 立减活动规则
     */
    @Override
    public ReductionRules selectReductionRulesById(Long rulesId)
    {
        return reductionRulesMapper.selectReductionRulesById(rulesId);
    }

    /**
     * 查询立减活动规则列表
     * 
     * @param reductionRules 立减活动规则
     * @return 立减活动规则
     */
    @Override
    public List<ReductionRules> selectReductionRulesList(ReductionRules reductionRules)
    {
        return reductionRulesMapper.selectReductionRulesList(reductionRules);
    }

    /**
     * 新增立减活动规则
     * 
     * @param reductionRules 立减活动规则
     * @return 结果
     */
    @Override
    public int insertReductionRules(ReductionRules reductionRules)
    {
        return reductionRulesMapper.insertReductionRules(reductionRules);
    }

    /**
     * 修改立减活动规则
     * 
     * @param reductionRules 立减活动规则
     * @return 结果
     */
    @Override
    public int updateReductionRules(ReductionRules reductionRules)
    {
        return reductionRulesMapper.updateReductionRules(reductionRules);
    }

    /**
     * 批量删除立减活动规则
     * 
     * @param rulesIds 需要删除的立减活动规则ID
     * @return 结果
     */
    @Override
    public int deleteReductionRulesByIds(Long[] rulesIds)
    {
        return reductionRulesMapper.deleteReductionRulesByIds(rulesIds);
    }

    /**
     * 删除立减活动规则信息
     * 
     * @param rulesId 立减活动规则ID
     * @return 结果
     */
    @Override
    public int deleteReductionRulesById(Long rulesId)
    {
        return reductionRulesMapper.deleteReductionRulesById(rulesId);
    }
}
